<?php
class Hoidap_Component_Block_Share extends Phpfox_Component
{

	public function process()
	{
	/* Hoan dang lam */
		// $hoidapcategory = Phpfox::getLib('database')->select('hdc.category_name, hdc.category_id, hdc.category_image ')
		// ->from('phpfox_hoidap_category hdc')
		// ->where('hdc.category_parent =0 AND category_status=1') 
		// ->order('hdc.category_order') 
		// ->limit(10) 
		// ->execute('getSlaveRows');
		
	$category = Phpfox::getService('hoidap.category')->get('30'); 
	$this->template()->assign('category', $category);  

	$idcad = $category[0]['category_id'];
	$category_parent = Phpfox::getService('hoidap.category')->selectListCategoryById($idcad); 
	$this->template()->assign('category_parent', $category_parent);		
			
		// echo "22";
// echo "<pre>";
// print_r($category_parent);
// echo "</pre>";
		// $this->template()->assign('hoidapcategory',$hoidapcategory);
		// $this->template()->assign(array(
						// 'hoidapcategory' => $hoidapcategory
						// )
						// );

	}	

}

?>